﻿Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim stInput As String = TextBox1.Text
        Dim cc As string = """"
        stInput = stInput.Replace("[", "")
        stInput = stInput.Replace("]", "")
        stInput = stInput.Replace(cc, "")
        Dim a As Object
        a = Split(stInput, "|")
        Dim ListOfDisableValve As String
        ListOfDisableValve = a(1)
        Dim c As Object
        c = Split(a(1), ",")
        '[LINKID]  = 11803  Or  [LINKID]  = 11804
        Dim st As String = ""
        If RadioButton1.Checked = True Then
            For j As Integer = LBound(c) To UBound(c)
                If j < UBound(c) Then
                    st = st & "[LINKID]  = " & c(j) & " Or "
                Else
                    st = st & "[LINKID]  = " & c(j)
                End If
            Next
        Else
            For j As Integer = LBound(c) To UBound(c)
                If j < UBound(c) Then
                    st = st & "[NodeID]  = " & c(j) & " Or "
                Else
                    st = st & "[NodeID]  = " & c(j)
                End If
            Next
        End If

        TextBox2.Text = st
    End Sub
End Class
